package com.donica.wamstest.utils;

import java.util.UUID;

import com.alibaba.fastjson.JSONObject;

public class CommonUtil {
	
	public static final String STR_BLANK = "-1";
	
	public static String get32UUID() {
        String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");
        return uuid;
    }
	
	public static boolean isNotBlank(String key) {
		
		if(key == null) {
			return false;
		}
		
		if(key.equals("")) {
			return false;
		}
		
		if(key.equals(STR_BLANK)) {
			return false;
		}
		
		return true;
	}
	
	public static String toJsonString(Object obj) {
		return JSONObject.toJSONString(obj);
	}
}
